import request from '@/utils/request'

export function getList(page, limit, repairQuery) {
  return request({
    url: `/dormitory/repair/list/${page}/${limit}`,
    method: 'post',
    data: repairQuery
  })
}

export function getRepair(id) {
  return request({
    url: `/dormitory/repair/getRepair/${id}`,
    method: 'get'
  })
}

export function save(repair) {
  return request({
    url: `/dormitory/repair/save`,
    method: 'post',
    data: repair
  })
}

export function update(repair) {
  return request({
    url: `/dormitory/repair/update`,
    method: 'post',
    data: repair
  })
}

export function remove(id) {
  return request({
    url: `/dormitory/repair/remove/${id}`,
    method: 'delete'
  })
}

export function buildingList() {
  return request({
    url: `/dormitory/building/buildingList`,
    method: 'get'
  })
}

export function floorList() {
  return request({
    url: `/dormitory/building/floorList`,
    method: 'get'
  })
}

export function floorListById(id) {
  return request({
    url: `/dormitory/building/floorListById/${id}`,
    method: 'get'
  })
}
